<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>

    function Person(){
        this.a = 'frank'
    }
    var p = new Person();
    Person.prototype.foo = function(){

    }

    function Admin(){
        this.b = 'tom';
        this.c = function(){

        }
    }
    Admin.prototype = new Person();
    var a = new Admin();
    console.log(Object.getOwnPropertyNames(a));
    console.log("**********************")
    for(var i in a){
        console.log(i);
        //console.log(a.hasOwnProperty(i));
    }

</script>
</body>
</html>